<template>
  <div class="studentProfill">
    <!-- 头像 -->
    <div class="headImg">
      <el-avatar
        shape="square"
        :size="200"
        :src="currentRow.headimgurl?currentRow.headimgurl:defaultAvatarUrl"
      ></el-avatar>
    </div>

    <!-- descriptions -->
    <el-descriptions
      title="垂直带边框列表"
      direction="vertical"
      :column="3"
      border
    >
      <el-descriptions-item label="sId">
          {{currentRow.sId}}
      </el-descriptions-item>
      <el-descriptions-item label="姓名">
          {{currentRow.name}}
      </el-descriptions-item>
      <el-descriptions-item label="年龄">
          {{currentRow.age}}
      </el-descriptions-item>
      <el-descriptions-item label="班级">
          {{currentRow.class}}
      </el-descriptions-item>
      <el-descriptions-item label="学历">
          {{currentRow.degree}}
      </el-descriptions-item>
      <el-descriptions-item label="项目地址">
          {{currentRow.productUrl}}
      </el-descriptions-item>
      <el-descriptions-item label="描述">
          {{currentRow.description}}
      </el-descriptions-item>
      <el-descriptions-item label="城市">
          {{currentRow.city}}
      </el-descriptions-item>
      <el-descriptions-item label="创建时间">
          {{currentRow.cTime}}
      </el-descriptions-item>
    </el-descriptions>

    <!-- 返回列表按钮 -->
    <el-button type="primary" @click="back">点击返回列表</el-button>
  </div>
</template>
<script>
import {mapState} from "vuex"
export default {
  computed: {
      ...mapState(["singleStuData","currentRow"])
  },
  meta: {
    title: "xyzl",
    icon: "iconfont icon-shuju1",
    name: "studentprofill"
  },
  methods: {
      back(){
          this.$router.back()
      }
  },
  data(){
      return {
          defaultAvatarUrl: "https://cube.elemecdn.com/0/88/03b0d39583f48206768a7534e55bcpng.png"
      }
  }
};
</script>
<style lang="less" scoped>
.headImg {
  line-height: 30px;
}
/deep/ .el-descriptions__title {
  line-height: 10px;
}
</style>
